// 《围棋》作者版权所有。版权所有。
// 此源代码的使用受BSD样式
// 许可证的约束，该许可证可以在许可证文件中找到。

// go:build ignore 
// +build ignore 

package main

import "strings"

// /注意：
// -整数类型位于寄存器的低部分。上部是垃圾。
// /-布尔类型使用寄存器的低位字节。0=假，1=真。
// 高位字节是垃圾。
// -在执行子寄存器操作时，我们尝试写入整个
// 目标寄存器，以避免部分寄存器写入。
// -未使用的生长素部分（或ValAndOff的Val部分）由扩展使用部分的符号填充。将
// 生长素解释为未签名（例如轮班）的生长素用户必须小心。
// /-SB“寄存器”使用指令相关寻址实现。此
// 对相对于SB寻址的内存操作数的使用时间和方式进行了一些限制：
// 
// 1。当
// 使用SB“寄存器”来寻址数据时，伪指令并不总是映射到一条机器指令。这是因为许多机器
// 指令没有相对长（RL后缀）的等价物。例如，
// ADDload，它被组装为AG。
// 
// 2。使用相对寻址的加载和存储要求数据根据大小对齐
// 等（双字8字节，字
// 等）。
// 
// 我们总是可以通过在汇编程序中插入大量指令（加载地址
// 相对较长）来解决这些问题，但通常这会导致生成更糟糕的代码
// 因为地址不能重复使用。在
// 汇编程序中插入指令也意味着关闭临时寄存器，长期目标是防止编译器这样做，以便将其分配为正常的
// 寄存器。
// 
// 有关z/体系结构、指令集和
// 它支持的寻址模式的更多信息，请查看
// 操作的z/体系结构原则：http:
// 
// 后缀编码伪指令的位宽度。
// D（双字）=64位（常省略）
// W（字）=32位
// H（半字）=16位
// B（字节）=8位
// S（单字）32位（省略双精度）

// 复制自..
var regNamesS390X = []string{
	"R0",
	"R1",
	"R2",
	"R3",
	"R4",
	"R5",
	"R6",
	"R7",
	"R8",
	"R9",
	"R10",
	"R11",
	"R12",
	"g", // R13 
	"R14",
	"SP", // R15 
	"F0",
	"F1",
	"F2",
	"F3",
	"F4",
	"F5",
	"F6",
	"F7",
	"F8",
	"F9",
	"F10",
	"F11",
	"F12",
	"F13",
	"F14",
	"F15",

	// 如果添加寄存器，请在运行时更新asyncPreempt。

	// 伪寄存器
	"SB",
}

func init() {
	// 将注册表名映射到注册表整数。
	if len(regNamesS390X) > 64 {
		panic("too many registers")
	}
	num := map[string]int{}
	for i, name := range regNamesS390X {
		num[name] = i
	}
	buildReg := func(s string) regMask {
		m := regMask(0)
		for _, r := range strings.Split(s, " ") {
			if n, ok := num[r]; ok {
				m |= regMask(1) << uint(n)
				continue
			}
			panic("register " + r + " not found")
		}
		return m
	}

	// Common individual register masks 
	var (
		sp  = buildReg("SP")
		sb  = buildReg("SB")
		r0  = buildReg("R0")
		tmp = buildReg("R11") // R11在少量指令中用作临时寄存器。

		// R10由汇编程序保留。
		gp   = buildReg("R0 R1 R2 R3 R4 R5 R6 R7 R8 R9 R11 R12 R14")
		gpg  = gp | buildReg("g")
		gpsp = gp | sp

		// R0被认为在地址计算中包含值0。
		ptr     = gp &^ r0
		ptrsp   = ptr | sp
		ptrspsb = ptrsp | sb

		fp         = buildReg("F0 F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 F13 F14 F15")
		callerSave = gp | fp | buildReg("g") // 运行时。setg（以及任何称之为setg的东西）可能会破坏g 
		r1         = buildReg("R1")
		r2         = buildReg("R2")
		r3         = buildReg("R3")
	)
	// 寄存器掩码的公共片
	var (
		gponly = []regMask{gp}
		fponly = []regMask{fp}
	)

	// Common regInfo 
	var (
		gp01    = regInfo{inputs: []regMask{}, outputs: gponly}
		gp11    = regInfo{inputs: []regMask{gp}, outputs: gponly}
		gp11sp  = regInfo{inputs: []regMask{gpsp}, outputs: gponly}
		gp21    = regInfo{inputs: []regMask{gp, gp}, outputs: gponly}
		gp21sp  = regInfo{inputs: []regMask{gpsp, gp}, outputs: gponly}
		gp21tmp = regInfo{inputs: []regMask{gp &^ tmp, gp &^ tmp}, outputs: []regMask{gp &^ tmp}, clobbers: tmp}

		// 当用作移位
		// 的位数时，R0计算为0，因此我们需要将其从该操作数中排除。
		sh21 = regInfo{inputs: []regMask{gp, ptr}, outputs: gponly}

		addr    = regInfo{inputs: []regMask{sp | sb}, outputs: gponly}
		addridx = regInfo{inputs: []regMask{sp | sb, ptrsp}, outputs: gponly}

		gp2flags       = regInfo{inputs: []regMask{gpsp, gpsp}}
		gp1flags       = regInfo{inputs: []regMask{gpsp}}
		gp2flags1      = regInfo{inputs: []regMask{gp, gp}, outputs: gponly}
		gp11flags      = regInfo{inputs: []regMask{gp}, outputs: gponly}
		gp21flags      = regInfo{inputs: []regMask{gp, gp}, outputs: gponly}
		gp2flags1flags = regInfo{inputs: []regMask{gp, gp}, outputs: gponly}

		gpload       = regInfo{inputs: []regMask{ptrspsb, 0}, outputs: gponly}
		gploadidx    = regInfo{inputs: []regMask{ptrspsb, ptrsp, 0}, outputs: gponly}
		gpopload     = regInfo{inputs: []regMask{gp, ptrsp, 0}, outputs: gponly}
		gpstore      = regInfo{inputs: []regMask{ptrspsb, gpsp, 0}}
		gpstoreconst = regInfo{inputs: []regMask{ptrspsb, 0}}
		gpstoreidx   = regInfo{inputs: []regMask{ptrsp, ptrsp, gpsp, 0}}
		gpstorebr    = regInfo{inputs: []regMask{ptrsp, gpsp, 0}}
		gpstorelaa   = regInfo{inputs: []regMask{ptrspsb, gpsp, 0}, outputs: gponly}
		gpstorelab   = regInfo{inputs: []regMask{r1, gpsp, 0}, clobbers: r1}

		gpmvc = regInfo{inputs: []regMask{ptrsp, ptrsp, 0}}

		fp01        = regInfo{inputs: []regMask{}, outputs: fponly}
		fp21        = regInfo{inputs: []regMask{fp, fp}, outputs: fponly}
		fp31        = regInfo{inputs: []regMask{fp, fp, fp}, outputs: fponly}
		fp21clobber = regInfo{inputs: []regMask{fp, fp}, outputs: fponly}
		fpgp        = regInfo{inputs: fponly, outputs: gponly}
		gpfp        = regInfo{inputs: gponly, outputs: fponly}
		fp11        = regInfo{inputs: fponly, outputs: fponly}
		fp1flags    = regInfo{inputs: []regMask{fp}}
		fp11clobber = regInfo{inputs: fponly, outputs: fponly}
		fp2flags    = regInfo{inputs: []regMask{fp, fp}}

		fpload    = regInfo{inputs: []regMask{ptrspsb, 0}, outputs: fponly}
		fploadidx = regInfo{inputs: []regMask{ptrsp, ptrsp, 0}, outputs: fponly}

		fpstore    = regInfo{inputs: []regMask{ptrspsb, fp, 0}}
		fpstoreidx = regInfo{inputs: []regMask{ptrsp, ptrsp, fp, 0}}

		sync = regInfo{inputs: []regMask{0}}

		// LoweredAtomicCas可能会覆盖arg1，所以现在将其强制为R0。
		cas = regInfo{inputs: []regMask{ptrsp, r0, gpsp, 0}, outputs: []regMask{gp, 0}, clobbers: r0}

		// LoweredAtomicExchange在执行
		// CS{，G}之前会覆盖输出，因此输出寄存器不能与
		// 输入寄存器相同。现在我们只需将输出寄存器强制设置为
		// R0。
		exchange = regInfo{inputs: []regMask{ptrsp, gpsp &^ r0, 0}, outputs: []regMask{r0, 0}}
	)

	var S390Xops = []opData{
		// fp ops 
		{name: "FADDS", argLength: 2, reg: fp21clobber, typ: "(Float32,Flags)", asm: "FADDS", commutative: true, resultInArg0: true}, // fp32 arg0+arg1 
		{name: "FADD", argLength: 2, reg: fp21clobber, typ: "(Float64,Flags)", asm: "FADD", commutative: true, resultInArg0: true},   // fp64 arg0+arg1 
		{name: "FSUBS", argLength: 2, reg: fp21clobber, typ: "(Float32,Flags)", asm: "FSUBS", resultInArg0: true},                    // fp32 arg0-arg1 
		{name: "FSUB", argLength: 2, reg: fp21clobber, typ: "(Float64,Flags)", asm: "FSUB", resultInArg0: true},                      // fp64 arg0-arg1 
		{name: "FMULS", argLength: 2, reg: fp21, asm: "FMULS", commutative: true, resultInArg0: true},                                // fp32 arg0*arg1 
		{name: "FMUL", argLength: 2, reg: fp21, asm: "FMUL", commutative: true, resultInArg0: true},                                  // fp64 arg0*arg1 
		{name: "FDIVS", argLength: 2, reg: fp21, asm: "FDIVS", resultInArg0: true},                                                   // fp32 arg0/arg1 
		{name: "FMADDS", argLength: 3, reg: fp31, asm: "FMADDS", resultInArg0: true},                                                 // fp32-arg1*arg2+arg0-
		{name: "FMADD", argLength: 3, reg: fp31, asm: "FMADD", resultInArg0: true},                                                   // fp64-arg1*arg2+arg0-
		{name: "FMSUBS", argLength: 3, reg: fp31, asm: "FMSUBS", resultInArg0: true},                                                 // fp32-arg1*arg2-arg0-
		{name: "LNDFR", argLength: 1, reg: fp11, asm: "LNDFR"},                                                                       // fp64/fp32清除符号位
		{name: "CPSDR", argLength: 2, reg: fp21, asm: "CPSDR"},                                                                       // fp64/fp32将arg1符号位复制到arg0-

		// 
		// aux |舍入模式
		// +---------------------------------------
		// 1 |舍入到最近，舍入到0 
		// 4 |舍入到最近，舍入到偶数
		// 5 |舍入到0 
		// 6 |舍入到+∞ 
		// 7 |朝-∞ fp64加载
		{name: "FIDBR", argLength: 1, reg: fp11, asm: "FIDBR", aux: "Int8"},

		{name: "FMOVSconst", reg: fp01, asm: "FMOVS", aux: "Float32", rematerializeable: true},                               // fp32常量
		{name: "FMOVDconst", reg: fp01, asm: "FMOVD", aux: "Float64", rematerializeable: true},                               // fp64常量
		{name: "FMOVSloadidx", argLength: 3, reg: fploadidx, asm: "FMOVS", aux: "SymOff", symEffect: "Read"},                 // fp32加载由我索引
		{name: "FMOVDloadidx", argLength: 3, reg: fploadidx, asm: "FMOVD", aux: "SymOff", symEffect: "Read"},                 // fp64加载由我索引

		{name: "FMOVSstore", argLength: 3, reg: fpstore, asm: "FMOVS", aux: "SymOff", faultOnNilArg0: true, symEffect: "Write"}, // fp64存储
		{name: "FMOVDstore", argLength: 3, reg: fpstore, asm: "FMOVD", aux: "SymOff", faultOnNilArg0: true, symEffect: "Write"}, // fp64存储
		{name: "FMOVSstoreidx", argLength: 4, reg: fpstoreidx, asm: "FMOVS", aux: "SymOff", symEffect: "Write"},                 // fp32由我存储
		{name: "FMOVDstoreidx", argLength: 4, reg: fpstoreidx, asm: "FMOVD", aux: "SymOff", symEffect: "Write"},                 // 250

		{name: "ADD", argLength: 2, reg: gp21sp, asm: "ADD", commutative: true, clobberFlags: true},                                                                  // arg0+arg1 
		{name: "ADDW", argLength: 2, reg: gp21sp, asm: "ADDW", commutative: true, clobberFlags: true},                                                                // arg0+arg1 
		{name: "ADDconst", argLength: 1, reg: gp11sp, asm: "ADD", aux: "Int32", typ: "UInt64", clobberFlags: true},                                                   // arg0+auxint 
		{name: "ADDWconst", argLength: 1, reg: gp11sp, asm: "ADDW", aux: "Int32", clobberFlags: true},                                                                // arg0+auxint 
		{name: "ADDload", argLength: 3, reg: gpopload, asm: "ADD", aux: "SymOff", resultInArg0: true, clobberFlags: true, faultOnNilArg1: true, symEffect: "Read"},   // arg0+*arg1。arg2=mem 
		{name: "ADDWload", argLength: 3, reg: gpopload, asm: "ADDW", aux: "SymOff", resultInArg0: true, clobberFlags: true, faultOnNilArg1: true, symEffect: "Read"}, // arg0+*arg1。arg2=mem 

		{name: "SUB", argLength: 2, reg: gp21, asm: "SUB", clobberFlags: true},                                                                                       // arg0-arg1 
		{name: "SUBW", argLength: 2, reg: gp21, asm: "SUBW", clobberFlags: true},                                                                                     // arg0-arg1 
		{name: "SUBconst", argLength: 1, reg: gp11, asm: "SUB", aux: "Int32", resultInArg0: true, clobberFlags: true},                                                // arg0-auxint 
		{name: "SUBWconst", argLength: 1, reg: gp11, asm: "SUBW", aux: "Int32", resultInArg0: true, clobberFlags: true},                                              // arg0-auxint 
		{name: "SUBload", argLength: 3, reg: gpopload, asm: "SUB", aux: "SymOff", resultInArg0: true, clobberFlags: true, faultOnNilArg1: true, symEffect: "Read"},   // arg0-*arg1。arg2=mem 
		{name: "SUBWload", argLength: 3, reg: gpopload, asm: "SUBW", aux: "SymOff", resultInArg0: true, clobberFlags: true, faultOnNilArg1: true, symEffect: "Read"}, // arg0-*arg1。arg2=mem 

		{name: "MULLD", argLength: 2, reg: gp21, asm: "MULLD", typ: "Int64", commutative: true, resultInArg0: true, clobberFlags: true},                                // arg0*arg1 
		{name: "MULLW", argLength: 2, reg: gp21, asm: "MULLW", typ: "Int32", commutative: true, resultInArg0: true, clobberFlags: true},                                // arg0*arg1 
		{name: "MULLDconst", argLength: 1, reg: gp11, asm: "MULLD", aux: "Int32", typ: "Int64", resultInArg0: true, clobberFlags: true},                                // arg0*生长素
		{name: "MULLWconst", argLength: 1, reg: gp11, asm: "MULLW", aux: "Int32", typ: "Int32", resultInArg0: true, clobberFlags: true},                                // arg0*生长素
		{name: "MULLDload", argLength: 3, reg: gpopload, asm: "MULLD", aux: "SymOff", resultInArg0: true, clobberFlags: true, faultOnNilArg1: true, symEffect: "Read"}, // arg0**arg1。arg2=mem 
		{name: "MULLWload", argLength: 3, reg: gpopload, asm: "MULLW", aux: "SymOff", resultInArg0: true, clobberFlags: true, faultOnNilArg1: true, symEffect: "Read"}, // arg0**arg1。arg2=mem 

		{name: "MULHD", argLength: 2, reg: gp21tmp, asm: "MULHD", typ: "Int64", commutative: true, resultInArg0: true, clobberFlags: true},   // （arg0*arg1）>>宽度
		{name: "MULHDU", argLength: 2, reg: gp21tmp, asm: "MULHDU", typ: "Int64", commutative: true, resultInArg0: true, clobberFlags: true}, // （arg0*arg1）>>宽度

		{name: "DIVD", argLength: 2, reg: gp21tmp, asm: "DIVD", resultInArg0: true, clobberFlags: true},   // arg0/arg1 
		{name: "DIVW", argLength: 2, reg: gp21tmp, asm: "DIVW", resultInArg0: true, clobberFlags: true},   // arg0/arg1 
		{name: "DIVDU", argLength: 2, reg: gp21tmp, asm: "DIVDU", resultInArg0: true, clobberFlags: true}, // arg0/arg1 
		{name: "DIVWU", argLength: 2, reg: gp21tmp, asm: "DIVWU", resultInArg0: true, clobberFlags: true}, // arg0/arg1 

		{name: "MODD", argLength: 2, reg: gp21tmp, asm: "MODD", resultInArg0: true, clobberFlags: true}, // arg0%arg1 


		{name: "ANDW", argLength: 2, reg: gp21, asm: "ANDW", commutative: true, clobberFlags: true},                                                                  // arg0和arg1 
		{name: "ANDconst", argLength: 1, reg: gp11, asm: "AND", aux: "Int64", resultInArg0: true, clobberFlags: true},                                                // arg0和生长素
		{name: "ANDWconst", argLength: 1, reg: gp11, asm: "ANDW", aux: "Int32", resultInArg0: true, clobberFlags: true},                                              // arg0和生长素
		{name: "ANDload", argLength: 3, reg: gpopload, asm: "AND", aux: "SymOff", resultInArg0: true, clobberFlags: true, faultOnNilArg1: true, symEffect: "Read"},   // arg0和*arg1。arg2=mem 
		{name: "ANDWload", argLength: 3, reg: gpopload, asm: "ANDW", aux: "SymOff", resultInArg0: true, clobberFlags: true, faultOnNilArg1: true, symEffect: "Read"}, // arg0&*arg1。arg2=mem 

		{name: "OR", argLength: 2, reg: gp21, asm: "OR", commutative: true, clobberFlags: true},                                                                    // arg0 | arg1 
		{name: "ORW", argLength: 2, reg: gp21, asm: "ORW", commutative: true, clobberFlags: true},                                                                  // arg0 | arg1 
		{name: "ORconst", argLength: 1, reg: gp11, asm: "OR", aux: "Int64", resultInArg0: true, clobberFlags: true},                                                // arg0 |生长素
		{name: "ORWconst", argLength: 1, reg: gp11, asm: "ORW", aux: "Int32", resultInArg0: true, clobberFlags: true},                                              // arg0 |生长素
		{name: "ORload", argLength: 3, reg: gpopload, asm: "OR", aux: "SymOff", resultInArg0: true, clobberFlags: true, faultOnNilArg1: true, symEffect: "Read"},   // arg0 |*arg1。arg2=mem 
		{name: "ORWload", argLength: 3, reg: gpopload, asm: "ORW", aux: "SymOff", resultInArg0: true, clobberFlags: true, faultOnNilArg1: true, symEffect: "Read"}, // arg0 |*arg1。arg2=mem 

		{name: "XOR", argLength: 2, reg: gp21, asm: "XOR", commutative: true, clobberFlags: true},                                                                    // arg0^arg1 
		{name: "XORW", argLength: 2, reg: gp21, asm: "XORW", commutative: true, clobberFlags: true},                                                                  // arg0^arg1 
		{name: "XORconst", argLength: 1, reg: gp11, asm: "XOR", aux: "Int64", resultInArg0: true, clobberFlags: true},                                                // arg0^auxint 
		{name: "XORWconst", argLength: 1, reg: gp11, asm: "XORW", aux: "Int32", resultInArg0: true, clobberFlags: true},                                              // arg0^auxint 
		{name: "XORload", argLength: 3, reg: gpopload, asm: "XOR", aux: "SymOff", resultInArg0: true, clobberFlags: true, faultOnNilArg1: true, symEffect: "Read"},   // arg0^*arg1。arg2=mem 
		{name: "XORWload", argLength: 3, reg: gpopload, asm: "XORW", aux: "SymOff", resultInArg0: true, clobberFlags: true, faultOnNilArg1: true, symEffect: "Read"}, // arg0^*arg1。arg2=mem 

		// 带进位/借位链的算术运算。
		// 
		// 进位由条件代码2或3（GT或OV）表示。
		// 借用由条件代码0或1（EQ或LT）表示。
		{name: "ADDC", argLength: 2, reg: gp21flags, asm: "ADDC", typ: "(UInt64,Flags)", commutative: true},                          // （arg0+arg1，执行）
		{name: "ADDCconst", argLength: 1, reg: gp11flags, asm: "ADDC", typ: "(UInt64,Flags)", aux: "Int16"},                          // （arg0+生长素，执行）
		{name: "ADDE", argLength: 3, reg: gp2flags1flags, asm: "ADDE", typ: "(UInt64,Flags)", commutative: true, resultInArg0: true}, // （arg0+arg1+arg2（执行），执行）
		{name: "SUBC", argLength: 2, reg: gp21flags, asm: "SUBC", typ: "(UInt64,Flags)"},                                             // （arg0-arg1，借出）
		{name: "SUBE", argLength: 3, reg: gp2flags1flags, asm: "SUBE", typ: "(UInt64,Flags)", resultInArg0: true},                    // （arg0-arg1-arg2（借入），借出）

		{name: "CMP", argLength: 2, reg: gp2flags, asm: "CMP", typ: "Flags"},   // arg0与arg1比较
		{name: "CMPW", argLength: 2, reg: gp2flags, asm: "CMPW", typ: "Flags"}, // arg0与arg1比较

		{name: "CMPU", argLength: 2, reg: gp2flags, asm: "CMPU", typ: "Flags"},   // arg0与arg1比较
		{name: "CMPWU", argLength: 2, reg: gp2flags, asm: "CMPWU", typ: "Flags"}, // arg0与arg1比较

		{name: "CMPconst", argLength: 1, reg: gp1flags, asm: "CMP", typ: "Flags", aux: "Int32"},     // arg0与生长素比较
		{name: "CMPWconst", argLength: 1, reg: gp1flags, asm: "CMPW", typ: "Flags", aux: "Int32"},   // arg0与生长素比较
		{name: "CMPUconst", argLength: 1, reg: gp1flags, asm: "CMPU", typ: "Flags", aux: "Int32"},   // arg0与生长素比较
		{name: "CMPWUconst", argLength: 1, reg: gp1flags, asm: "CMPWU", typ: "Flags", aux: "Int32"}, // arg0与生长素比较

		{name: "FCMPS", argLength: 2, reg: fp2flags, asm: "CEBR", typ: "Flags"},  // arg0与arg1比较，f32 
		{name: "FCMP", argLength: 2, reg: fp2flags, asm: "FCMPU", typ: "Flags"},  // arg0与arg1比较，f64 
		{name: "LTDBR", argLength: 1, reg: fp1flags, asm: "LTDBR", typ: "Flags"}, // arg0与0比较，f64 
		{name: "LTEBR", argLength: 1, reg: fp1flags, asm: "LTEBR", typ: "Flags"}, // arg0与0比较，f32 

		{name: "SLD", argLength: 2, reg: sh21, asm: "SLD"},                    // arg0<arg1，移位量为mod 64 
		{name: "SLW", argLength: 2, reg: sh21, asm: "SLW"},                    // arg0<arg1，移位量为mod 64 
		{name: "SLDconst", argLength: 1, reg: gp11, asm: "SLD", aux: "UInt8"}, // arg0<auxint，移位量为mod 64 
		{name: "SLWconst", argLength: 1, reg: gp11, asm: "SLW", aux: "UInt8"}, // arg0<auxint，移位量0-31 

		{name: "SRD", argLength: 2, reg: sh21, asm: "SRD"},                    // 无符号arg0>>arg1，移位量为mod 64 
		{name: "SRW", argLength: 2, reg: sh21, asm: "SRW"},                    // 无符号uint32（arg0）>>arg1，移位量为mod 64 
		{name: "SRDconst", argLength: 1, reg: gp11, asm: "SRD", aux: "UInt8"}, // 无符号arg0>>auxint，移位量0-63 
		{name: "SRWconst", argLength: 1, reg: gp11, asm: "SRW", aux: "UInt8"}, // 无符号uint32（arg0）>>auxint，移位量0-31 

		// 算术移位clobber标志。
		{name: "SRAD", argLength: 2, reg: sh21, asm: "SRAD", clobberFlags: true},                    // signed arg0>>arg1，移位量为mod 64 
		{name: "SRAW", argLength: 2, reg: sh21, asm: "SRAW", clobberFlags: true},                    // signed int32（arg0）>>arg1，移位量为mod 64 
		{name: "SRADconst", argLength: 1, reg: gp11, asm: "SRAD", aux: "UInt8", clobberFlags: true}, // signed arg0>>auxint，移位量0-63 
		{name: "SRAWconst", argLength: 1, reg: gp11, asm: "SRAW", aux: "UInt8", clobberFlags: true}, // signed int32（arg0）>auxint，移位量0-31 

		// 。
		// 注意：无RLLGconst-使用RISBGZ。
		{name: "RLLG", argLength: 2, reg: sh21, asm: "RLLG"},                  // arg0向左旋转arg1，旋转量0-63 
		{name: "RLL", argLength: 2, reg: sh21, asm: "RLL"},                    // arg0向左旋转arg1，旋转量0-31 
		{name: "RLLconst", argLength: 1, reg: gp11, asm: "RLL", aux: "UInt8"}, // arg0向左旋转生长素，旋转量0-31 

		// 然后旋转（和|或|异或|插入）所选位指令。
		// 
		// Aux是一款s390x。RotateParams结构，包含开始、结束和旋转
		// 金额字段。
		// 
		// arg1按旋转量向左旋转，然后使用指定的逻辑
		// 位到结束位（含）的位与arg0组合。位索引从左到右指定-
		// 操作将从起始
		// MSB为0，LSB为63。
		// 
		// 示例：
		// /| aux | 
		// /|指令|开始|结束|金额| arg0 | arg1 |结果| 
		// /+----+----+----+----+----+----------------------------------------------------------------------------------------------------+++-----------------------------------------------------------------------------------------------------------------------------++++--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------++++++-
		// /+-------------------+-------------------+---------------------------------------++---------------------------------------+
		// 
		{name: "RXSBG", argLength: 2, reg: gp21, asm: "RXSBG", resultInArg0: true, aux: "S390XRotateParams", clobberFlags: true}, // 旋转然后异或所选位
		{name: "RISBGZ", argLength: 1, reg: gp11, asm: "RISBGZ", aux: "S390XRotateParams", clobberFlags: true},                   // 旋转然后插入所选位[零]

		// 一元运算
		{name: "NEG", argLength: 1, reg: gp11, asm: "NEG", clobberFlags: true},   // /-arg0 
		{name: "NEGW", argLength: 1, reg: gp11, asm: "NEGW", clobberFlags: true}, // /-arg0 


		{name: "FSQRT", argLength: 1, reg: fp11, asm: "FSQRT"},   // sqrt（arg0）
		{name: "FSQRTS", argLength: 1, reg: fp11, asm: "FSQRTS"}, // sqrt（arg0），float32 

		// 条件寄存器移动。
		// 这些值的辅助参数是s390x。CCMask值，表示条件代码掩码。
		{name: "LOCGR", argLength: 3, reg: gp2flags1, resultInArg0: true, asm: "LOCGR", aux: "S390XCCMask"}, // 如果arg2中的条件代码与aux中的屏蔽位匹配，则将arg1加载到arg0中。

		{name: "MOVBreg", argLength: 1, reg: gp11sp, asm: "MOVB", typ: "Int64"},    // 符号将arg0从int8扩展到int64 
		{name: "MOVBZreg", argLength: 1, reg: gp11sp, asm: "MOVBZ", typ: "UInt64"}, // 符号将arg0从int8扩展到int64 
		{name: "MOVHreg", argLength: 1, reg: gp11sp, asm: "MOVH", typ: "Int64"},    // 符号将arg0从int16扩展到int64 
		{name: "MOVHZreg", argLength: 1, reg: gp11sp, asm: "MOVHZ", typ: "UInt64"}, // 符号将arg0从int16扩展到int64 
		{name: "MOVWZreg", argLength: 1, reg: gp11sp, asm: "MOVWZ", typ: "UInt64"}, // 符号将arg0从int32扩展到int64 

		{name: "MOVDconst", reg: gp01, asm: "MOVD", typ: "UInt64", aux: "Int64", rematerializeable: true}, // 符号

		{name: "LGDR", argLength: 1, reg: fpgp, asm: "LGDR"}, // 将浮点64移动到int64（无转换）

		{name: "CFDBRA", argLength: 1, reg: fpgp, asm: "CFDBRA", clobberFlags: true}, // 将浮点64转换到int32 
		{name: "CGDBRA", argLength: 1, reg: fpgp, asm: "CGDBRA", clobberFlags: true}, // 将浮点64转换到int64 
		{name: "CFEBRA", argLength: 1, reg: fpgp, asm: "CFEBRA", clobberFlags: true}, // 将浮点32转换到int32 
		{name: "CGEBRA", argLength: 1, reg: fpgp, asm: "CGEBRA", clobberFlags: true}, // 将浮点32转换到int64 
		{name: "CEFBRA", argLength: 1, reg: gpfp, asm: "CEFBRA", clobberFlags: true}, // 将int32转换到浮点32 
		{name: "CDFBRA", argLength: 1, reg: gpfp, asm: "CDFBRA", clobberFlags: true}, // 将int32转换到浮点64
		{name: "CEGBRA", argLength: 1, reg: gpfp, asm: "CEGBRA", clobberFlags: true}, // 将int64转换为float32 
		{name: "CDGBRA", argLength: 1, reg: gpfp, asm: "CDGBRA", clobberFlags: true}, // 将int64转换为float64 
		{name: "CLFEBR", argLength: 1, reg: fpgp, asm: "CLFEBR", clobberFlags: true}, // 将float32转换为uint32 
		{name: "CLFDBR", argLength: 1, reg: fpgp, asm: "CLFDBR", clobberFlags: true}, // 将float64转换为uint32 
		{name: "CLGEBR", argLength: 1, reg: fpgp, asm: "CLGEBR", clobberFlags: true}, // 将float32转换为uint64 
		{name: "CELFBR", argLength: 1, reg: gpfp, asm: "CELFBR", clobberFlags: true}, // 将uint32转换为float32 
		{name: "CDLFBR", argLength: 1, reg: gpfp, asm: "CDLFBR", clobberFlags: true}, // 将uint32转换为float64 
		{name: "CDLGBR", argLength: 1, reg: gpfp, asm: "CDLGBR", clobberFlags: true}, // 将uint64转换为float64 

		{name: "LEDBR", argLength: 1, reg: fp11, asm: "LEDBR"}, // 将float64转换为float32 
		{name: "LDEBR", argLength: 1, reg: fp11, asm: "LDEBR"}, // 将float32转换为float64 

		{name: "MOVDaddr", argLength: 1, reg: addr, aux: "SymOff", rematerializeable: true, symEffect: "Read"}, // 在aux 
		{name: "MOVDaddridx", argLength: 2, reg: addridx, aux: "SymOff", symEffect: "Read"},                    // arg0+arg1+auxint+aux 

		// auxint+aux==将aux中的auxint和符号偏移量（如果有）添加到有效地址
		{name: "MOVBZload", argLength: 2, reg: gpload, asm: "MOVBZ", aux: "SymOff", typ: "UInt8", faultOnNilArg0: true, symEffect: "Read"},  // 从arg0+auxint+aux加载字节。arg1=mem。零延伸。
		{name: "MOVBload", argLength: 2, reg: gpload, asm: "MOVB", aux: "SymOff", faultOnNilArg0: true, symEffect: "Read"},                  // 同上，符号扩展到int64 
		{name: "MOVHZload", argLength: 2, reg: gpload, asm: "MOVHZ", aux: "SymOff", typ: "UInt16", faultOnNilArg0: true, symEffect: "Read"}, // 从arg0+auxint+aux加载2个字节。arg1=mem。零延伸。
		{name: "MOVHload", argLength: 2, reg: gpload, asm: "MOVH", aux: "SymOff", faultOnNilArg0: true, symEffect: "Read"},                  // 同上，符号扩展到int64 
		{name: "MOVWZload", argLength: 2, reg: gpload, asm: "MOVWZ", aux: "SymOff", typ: "UInt32", faultOnNilArg0: true, symEffect: "Read"}, // 从arg0+auxint+aux加载4个字节。arg1=mem。零延伸。
		{name: "MOVWload", argLength: 2, reg: gpload, asm: "MOVW", aux: "SymOff", faultOnNilArg0: true, symEffect: "Read"},                  // 同上，符号扩展到int64 
		{name: "MOVDload", argLength: 2, reg: gpload, asm: "MOVD", aux: "SymOff", typ: "UInt64", faultOnNilArg0: true, symEffect: "Read"},   // 从arg0+auxint+aux加载8字节。arg1=mem 

		{name: "MOVWBR", argLength: 1, reg: gp11, asm: "MOVWBR"}, // arg0交换字节
		{name: "MOVDBR", argLength: 1, reg: gp11, asm: "MOVDBR"}, // arg0交换字节

		{name: "MOVHBRload", argLength: 2, reg: gpload, asm: "MOVHBR", aux: "SymOff", typ: "UInt16", faultOnNilArg0: true, symEffect: "Read"}, // 从arg0+auxint+aux加载2字节。arg1=mem。反向字节。
		{name: "MOVWBRload", argLength: 2, reg: gpload, asm: "MOVWBR", aux: "SymOff", typ: "UInt32", faultOnNilArg0: true, symEffect: "Read"}, // 从arg0+auxint+aux加载4字节。arg1=mem。反向字节。
		{name: "MOVDBRload", argLength: 2, reg: gpload, asm: "MOVDBR", aux: "SymOff", typ: "UInt64", faultOnNilArg0: true, symEffect: "Read"}, // 从arg0+auxint+aux加载8字节。arg1=mem。反向字节。

		{name: "MOVBstore", argLength: 3, reg: gpstore, asm: "MOVB", aux: "SymOff", typ: "Mem", faultOnNilArg0: true, symEffect: "Write"},       // 将arg1中的字节存储到arg0+auxint+aux。arg2=mem 
		{name: "MOVHstore", argLength: 3, reg: gpstore, asm: "MOVH", aux: "SymOff", typ: "Mem", faultOnNilArg0: true, symEffect: "Write"},       // 在arg1到arg0+auxint+aux中存储2个字节。arg2=mem 
		{name: "MOVWstore", argLength: 3, reg: gpstore, asm: "MOVW", aux: "SymOff", typ: "Mem", faultOnNilArg0: true, symEffect: "Write"},       // 在arg1到arg0+auxint+aux中存储4个字节。arg2=mem 
		{name: "MOVDstore", argLength: 3, reg: gpstore, asm: "MOVD", aux: "SymOff", typ: "Mem", faultOnNilArg0: true, symEffect: "Write"},       // 在arg1到arg0+auxint+aux中存储8个字节。arg2=mem 
		{name: "MOVHBRstore", argLength: 3, reg: gpstorebr, asm: "MOVHBR", aux: "SymOff", typ: "Mem", faultOnNilArg0: true, symEffect: "Write"}, // 在arg1到arg0+auxint+aux中存储2个字节。arg2=mem。反向字节。
		{name: "MOVWBRstore", argLength: 3, reg: gpstorebr, asm: "MOVWBR", aux: "SymOff", typ: "Mem", faultOnNilArg0: true, symEffect: "Write"}, // 在arg1到arg0+auxint+aux中存储4个字节。arg2=mem。反向字节。
		{name: "MOVDBRstore", argLength: 3, reg: gpstorebr, asm: "MOVDBR", aux: "SymOff", typ: "Mem", faultOnNilArg0: true, symEffect: "Write"}, // 在arg1到arg0+auxint+aux中存储8个字节。arg2=mem。反向字节。

		{name: "MVC", argLength: 3, reg: gpmvc, asm: "MVC", aux: "SymValAndOff", typ: "Mem", clobberFlags: true, faultOnNilArg0: true, faultOnNilArg1: true, symEffect: "None"}, // arg0=destptr，arg1=srcptr，arg2=mem，auxint=size，off 

		// 索引加载/存储
		{name: "MOVBZloadidx", argLength: 3, reg: gploadidx, commutative: true, asm: "MOVBZ", aux: "SymOff", typ: "UInt8", symEffect: "Read"},   // 从arg0+arg1+auxint+aux加载一个字节。arg2=mem。零延伸。
		{name: "MOVBloadidx", argLength: 3, reg: gploadidx, commutative: true, asm: "MOVB", aux: "SymOff", typ: "Int8", symEffect: "Read"},      // 从arg0+arg1+auxint+aux加载一个字节。arg2=mem。延长标志。
		{name: "MOVHZloadidx", argLength: 3, reg: gploadidx, commutative: true, asm: "MOVHZ", aux: "SymOff", typ: "UInt16", symEffect: "Read"},  // 从arg0+arg1+auxint+aux加载2个字节。arg2=mem。零延伸。
		{name: "MOVHloadidx", argLength: 3, reg: gploadidx, commutative: true, asm: "MOVH", aux: "SymOff", typ: "Int16", symEffect: "Read"},     // 从arg0+arg1+auxint+aux加载2个字节。arg2=mem。延长标志。
		{name: "MOVWZloadidx", argLength: 3, reg: gploadidx, commutative: true, asm: "MOVWZ", aux: "SymOff", typ: "UInt32", symEffect: "Read"},  // 从arg0+arg1+auxint+aux加载4个字节。arg2=mem。零延伸。
		{name: "MOVWloadidx", argLength: 3, reg: gploadidx, commutative: true, asm: "MOVW", aux: "SymOff", typ: "Int32", symEffect: "Read"},     // 从arg0+arg1+auxint+aux加载4个字节。arg2=mem。延长标志。
		{name: "MOVDloadidx", argLength: 3, reg: gploadidx, commutative: true, asm: "MOVD", aux: "SymOff", typ: "UInt64", symEffect: "Read"},    // 从arg0+arg1+auxint+aux加载8字节。arg2=mem 
		{name: "MOVHBRloadidx", argLength: 3, reg: gploadidx, commutative: true, asm: "MOVHBR", aux: "SymOff", typ: "Int16", symEffect: "Read"}, // 从arg0+arg1+auxint+aux加载2个字节。arg2=mem。反向字节。
		{name: "MOVWBRloadidx", argLength: 3, reg: gploadidx, commutative: true, asm: "MOVWBR", aux: "SymOff", typ: "Int32", symEffect: "Read"}, // 从arg0+arg1+auxint+aux加载4个字节。arg2=mem。反向字节。
		{name: "MOVDBRloadidx", argLength: 3, reg: gploadidx, commutative: true, asm: "MOVDBR", aux: "SymOff", typ: "Int64", symEffect: "Read"}, // 从arg0+arg1+auxint+aux加载8字节。arg2=mem。反向字节。
		{name: "MOVBstoreidx", argLength: 4, reg: gpstoreidx, commutative: true, asm: "MOVB", aux: "SymOff", symEffect: "Write"},                // 将arg2中的字节存储到arg0+arg1+auxint+aux。arg3=mem 
		{name: "MOVHstoreidx", argLength: 4, reg: gpstoreidx, commutative: true, asm: "MOVH", aux: "SymOff", symEffect: "Write"},                // 将arg2中的2个字节存储到arg0+arg1+auxint+aux。arg3=mem 
		{name: "MOVWstoreidx", argLength: 4, reg: gpstoreidx, commutative: true, asm: "MOVW", aux: "SymOff", symEffect: "Write"},                // 在arg2到arg0+arg1+auxint+aux中存储4个字节。arg3=mem 
		{name: "MOVDstoreidx", argLength: 4, reg: gpstoreidx, commutative: true, asm: "MOVD", aux: "SymOff", symEffect: "Write"},                // 将8个字节存储在arg2到arg0+arg1+auxint+aux中。arg3=mem 
		{name: "MOVHBRstoreidx", argLength: 4, reg: gpstoreidx, commutative: true, asm: "MOVHBR", aux: "SymOff", symEffect: "Write"},            // 将arg2中的2个字节存储到arg0+arg1+auxint+aux。arg3=mem。反向字节。
		{name: "MOVWBRstoreidx", argLength: 4, reg: gpstoreidx, commutative: true, asm: "MOVWBR", aux: "SymOff", symEffect: "Write"},            // 在arg2到arg0+arg1+auxint+aux中存储4个字节。arg3=mem。反向字节。
		{name: "MOVDBRstoreidx", argLength: 4, reg: gpstoreidx, commutative: true, asm: "MOVDBR", aux: "SymOff", symEffect: "Write"},            // 在arg2到arg0+arg1+auxint+aux中存储8个字节。arg3=mem。反向字节。

		// 对于storeconst ops，AuxInt字段对要存储的值和存储的地址偏移量进行编码。
		// 将生长素投到ValAndOff中，以提取Val和Off字段。
		{name: "MOVBstoreconst", argLength: 2, reg: gpstoreconst, asm: "MOVB", aux: "SymValAndOff", typ: "Mem", faultOnNilArg0: true, symEffect: "Write"}, // 存储ValAndOff（生长素）的低字节。Val（）到arg0+ValAndOff（生长素）。关闭（）。arg1=mem 
		{name: "MOVHstoreconst", argLength: 2, reg: gpstoreconst, asm: "MOVH", aux: "SymValAndOff", typ: "Mem", faultOnNilArg0: true, symEffect: "Write"}, // 存储低2字节的。。。
		{name: "MOVWstoreconst", argLength: 2, reg: gpstoreconst, asm: "MOVW", aux: "SymValAndOff", typ: "Mem", faultOnNilArg0: true, symEffect: "Write"}, // 存储低4字节的。。。
		{name: "MOVDstoreconst", argLength: 2, reg: gpstoreconst, asm: "MOVD", aux: "SymValAndOff", typ: "Mem", faultOnNilArg0: true, symEffect: "Write"}, // 存储8字节的。。。

		{name: "CLEAR", argLength: 2, reg: regInfo{inputs: []regMask{ptr, 0}}, asm: "CLEAR", aux: "SymValAndOff", typ: "Mem", clobberFlags: true, faultOnNilArg0: true, symEffect: "Write"},

		{name: "CALLstatic", argLength: 1, reg: regInfo{clobbers: callerSave}, aux: "CallOff", clobberFlags: true, call: true},                                                // 调用静态函数aux。（*obj.LSym）。arg0=mem，auxint=argsize，返回mem 
		{name: "CALLtail", argLength: 1, reg: regInfo{clobbers: callerSave}, aux: "CallOff", clobberFlags: true, call: true, tailCall: true},                                  // tail call静态函数aux。（*obj.LSym）。arg0=mem，auxint=argsize，返回mem 
		{name: "CALLclosure", argLength: 3, reg: regInfo{inputs: []regMask{ptrsp, buildReg("R12"), 0}, clobbers: callerSave}, aux: "CallOff", clobberFlags: true, call: true}, // 通过闭包调用函数。arg0=codeptr，arg1=closure，arg2=mem，auxint=argsize，返回mem 
		{name: "CALLinter", argLength: 2, reg: regInfo{inputs: []regMask{ptr}, clobbers: callerSave}, aux: "CallOff", clobberFlags: true, call: true},                         // 通过指针调用fn。arg0=codeptr，arg1=mem，auxint=argsize，返回mem 

		// （InvertFlags（CMP a b））==（CMP b a）
		// InvertFlags是一个伪操作，不能出现在程序集输出中。
		{name: "InvertFlags", argLength: 1}, // arg0的反向

		// 伪操作
		{name: "LoweredGetG", argLength: 1, reg: gp01}, // arg0=mem 
		// 调度程序确保LoweredGetClosurePtr仅出现在入口块中，
		// 并将其排序到块的最开始处，以防止其他
		// 使用R12（闭包指针）
		{name: "LoweredGetClosurePtr", reg: regInfo{outputs: []regMask{buildReg("R12")}}, zeroWidth: true},
		// arg0=ptr，arg1=mem，返回void。如果ptr为零，则出现故障。
		// LoweredGetCallerSP返回当前函数调用方的SP。
		{name: "LoweredGetCallerSP", reg: gp01, rematerializeable: true},
		// LoweredGetCallerPC计算其“调用者”将返回的PC。
		// 也就是说，如果f调用g“calls”getcallerpc，
		// 结果应该是g将返回的f内的PC。
		// 请参阅运行时/stubs。进行更详细的讨论。
		{name: "LoweredGetCallerPC", reg: gp01, rematerializeable: true},
		{name: "LoweredNilCheck", argLength: 2, reg: regInfo{inputs: []regMask{ptrsp}}, clobberFlags: true, nilCheck: true, faultOnNilArg0: true},
		// 四舍五入运算以阻止融合乘加提取。
		{name: "LoweredRound32F", argLength: 1, reg: fp11, resultInArg0: true, zeroWidth: true},
		{name: "LoweredRound64F", argLength: 1, reg: fp11, resultInArg0: true, zeroWidth: true},

		// LoweredWB调用运行时。gcWriteBarrier。arg0=destptr，arg1=srcptr，arg2=mem，aux=runtime。gcWriteBarrier 
		// 如果需要，它会保存所有GP寄存器，
		// 但是会关闭R14（LR），因为它是一个调用，
		// 也会关闭R1，就像PLT存根一样。
		{name: "LoweredWB", argLength: 3, reg: regInfo{inputs: []regMask{buildReg("R2"), buildReg("R3")}, clobbers: (callerSave &^ gpg) | buildReg("R14") | r1}, clobberFlags: true, aux: "Sym", symEffect: "None"},

		// 这些函数有三个，因此它们可以有三个不同的寄存器输入。
		// 当我们检查0<=c<=cap（A），然后检查0<=b<=c（b），然后检查0<=A<=b（c）时，我们希望
		// 默认寄存器匹配，所以我们不需要不必要地复制寄存器。
		{name: "LoweredPanicBoundsA", argLength: 3, aux: "Int64", reg: regInfo{inputs: []regMask{r2, r3}}, typ: "Mem", call: true}, // arg0=idx，arg1=len，arg2=mem，返回内存。AuxInt包含报告代码（参见generic.go中的PanicBounds）。
		{name: "LoweredPanicBoundsB", argLength: 3, aux: "Int64", reg: regInfo{inputs: []regMask{r1, r2}}, typ: "Mem", call: true}, // arg0=idx，arg1=len，arg2=mem，返回内存。AuxInt包含报告代码（参见generic.go中的PanicBounds）。
		{name: "LoweredPanicBoundsC", argLength: 3, aux: "Int64", reg: regInfo{inputs: []regMask{r0, r1}}, typ: "Mem", call: true}, // arg0=idx，arg1=len，arg2=mem，返回内存。AuxInt包含报告代码（参见generic.go中的PanicBounds）。

		// 恒定条件代码值。条件代码可以是0、1、2或3。
		{name: "FlagEQ"}, // CC=0（相等）
		{name: "FlagLT"}, // CC=1（小于）
		{name: "FlagGT"}, // CC=2（大于）
		{name: "FlagOV"}, // CC=3（溢出）

		// 快速BCR序列化以确保存储加载顺序。
		{name: "SYNC", argLength: 1, reg: sync, asm: "SYNC", typ: "Mem"},

		// 原子负载。这些只是正常的加载，但返回<value，memory>元组
		// 因此可以与其他加载一起正确排序。
		// 从arg0+auxint+aux加载。arg1=mem。
		{name: "MOVBZatomicload", argLength: 2, reg: gpload, asm: "MOVBZ", aux: "SymOff", faultOnNilArg0: true, symEffect: "Read"},
		{name: "MOVWZatomicload", argLength: 2, reg: gpload, asm: "MOVWZ", aux: "SymOff", faultOnNilArg0: true, symEffect: "Read"},
		{name: "MOVDatomicload", argLength: 2, reg: gpload, asm: "MOVD", aux: "SymOff", faultOnNilArg0: true, symEffect: "Read"},

		// 原子商店。这些只是普通商店。
		// 将arg1存储到arg0+生长素+aux。arg2=mem。
		{name: "MOVBatomicstore", argLength: 3, reg: gpstore, asm: "MOVB", aux: "SymOff", typ: "Mem", clobberFlags: true, faultOnNilArg0: true, hasSideEffects: true, symEffect: "Write"},
		{name: "MOVWatomicstore", argLength: 3, reg: gpstore, asm: "MOVW", aux: "SymOff", typ: "Mem", clobberFlags: true, faultOnNilArg0: true, hasSideEffects: true, symEffect: "Write"},
		{name: "MOVDatomicstore", argLength: 3, reg: gpstore, asm: "MOVD", aux: "SymOff", typ: "Mem", clobberFlags: true, faultOnNilArg0: true, hasSideEffects: true, symEffect: "Write"},

		// 原子添加。
		// /*（arg0+生长素+aux）+=arg1。arg2=mem。
		// 返回一个元组，元组中包含〈旧内容的*（arg0+auxint+aux），memory>。
		{name: "LAA", argLength: 3, reg: gpstorelaa, asm: "LAA", typ: "(UInt32,Mem)", aux: "SymOff", clobberFlags: true, faultOnNilArg0: true, hasSideEffects: true, symEffect: "RdWr"},
		{name: "LAAG", argLength: 3, reg: gpstorelaa, asm: "LAAG", typ: "(UInt64,Mem)", aux: "SymOff", clobberFlags: true, faultOnNilArg0: true, hasSideEffects: true, symEffect: "RdWr"},
		{name: "AddTupleFirst32", argLength: 2}, // arg1=tuple<x，y>。返回<x+arg0，y>。
		{name: "AddTupleFirst64", argLength: 2}, // arg1=tuple<x，y>。返回<x+arg0，y>。

		// 原子位运算。
		// 注意：“floor”操作将指针向下舍入到最近的单词边界
		// 这反映了它们在运行时的使用方式。
		{name: "LAN", argLength: 3, reg: gpstore, asm: "LAN", typ: "Mem", clobberFlags: true, hasSideEffects: true},         // /*arg0&=arg1。arg2=mem。
		{name: "LANfloor", argLength: 3, reg: gpstorelab, asm: "LAN", typ: "Mem", clobberFlags: true, hasSideEffects: true}, // /*（楼层（arg0，4））&=arg1。arg2=mem。
		{name: "LAO", argLength: 3, reg: gpstore, asm: "LAO", typ: "Mem", clobberFlags: true, hasSideEffects: true},         // /*arg0 |=arg1。arg2=mem。
		{name: "LAOfloor", argLength: 3, reg: gpstorelab, asm: "LAO", typ: "Mem", clobberFlags: true, hasSideEffects: true}, // /*（楼层（arg0，4））|=arg1。arg2=mem。

		// 比较和交换。
		// arg0=指针，arg1=旧值，arg2=新值，arg3=内存。
		// if*（arg0+auxint+aux）==arg1{
		// *（arg0+auxint+aux）=arg2 
		// return（true，memory）
		// }else{
		// return false，memory）
		// }
		// 注意，这些指令也返回arg1中的旧值，但我们忽略它。
		// TODO:用这些返回标志代替布尔。当前系统生成：
		// CS。。。
		// MOVD$0，ret 
		// BNE 2（PC）
		// MOVD$1，ret 
		// CMPW ret，$0 
		// BNE。。。
		// 而不仅仅是
		// CS。。。
		// BEQ。。。
		// 但我们不能这样做，因为使用ops的内存还不能生成标志
		// （flagalloc希望移动生成标志的指令）。
		{name: "LoweredAtomicCas32", argLength: 4, reg: cas, asm: "CS", aux: "SymOff", clobberFlags: true, faultOnNilArg0: true, hasSideEffects: true, symEffect: "RdWr"},
		{name: "LoweredAtomicCas64", argLength: 4, reg: cas, asm: "CSG", aux: "SymOff", clobberFlags: true, faultOnNilArg0: true, hasSideEffects: true, symEffect: "RdWr"},

		// 降低原子交换，使用比较和交换进行模拟。
		// 将arg1存储到arg0+auxint+aux，arg2=mem。
		{name: "LoweredAtomicExchange32", argLength: 3, reg: exchange, asm: "CS", aux: "SymOff", clobberFlags: true, faultOnNilArg0: true, hasSideEffects: true, symEffect: "RdWr"},
		{name: "LoweredAtomicExchange64", argLength: 3, reg: exchange, asm: "CSG", aux: "SymOff", clobberFlags: true, faultOnNilArg0: true, hasSideEffects: true, symEffect: "RdWr"},

		// 查找最左边的一个
		{
			name:         "FLOGR",
			argLength:    1,
			reg:          regInfo{inputs: gponly, outputs: []regMask{buildReg("R0")}, clobbers: buildReg("R1")},
			asm:          "FLOGR",
			typ:          "UInt64",
			clobberFlags: true,
		},

		// 人口计数
		// 
		// 计算arg0 
		// 的每个字节中的个数，并将结果放入结果的相应字节
		// 中。
		{
			name:         "POPCNT",
			argLength:    1,
			reg:          gp11,
			asm:          "POPCNT",
			typ:          "UInt64",
			clobberFlags: true,
		},

		// 无符号乘法（64x64）→ 128）
		// 
		// 将两个64位输入操作数相乘，并将128位结果放入
		// 奇偶寄存器对。目标对中的第二个寄存器还包含
		// 一个输入操作数。由于我们目前无法指定
		// 奇偶寄存器对，因此我们将该寄存器对硬编码为R2:R3。
		{
			name:      "MLGR",
			argLength: 2,
			reg:       regInfo{inputs: []regMask{gp, r3}, outputs: []regMask{r2, r3}},
			asm:       "MLGR",
		},

		// 求和POPCNT指令输出的伪操作
		{name: "SumBytes2", argLength: 1, typ: "UInt8"}, // 求和arg0中最右边的2个字节忽略溢出
		{name: "SumBytes4", argLength: 1, typ: "UInt8"}, // 求和arg0中最右边的4个字节忽略溢出
		{name: "SumBytes8", argLength: 1, typ: "UInt8"}, // 求和arg0中的所有字节忽略溢出

		// 存储多个
		{
			name:           "STMG2",
			argLength:      4,
			reg:            regInfo{inputs: []regMask{ptrsp, buildReg("R1"), buildReg("R2"), 0}},
			aux:            "SymOff",
			typ:            "Mem",
			asm:            "STMG",
			faultOnNilArg0: true,
			symEffect:      "Write",
			clobberFlags:   true, // TODO（mundaym）：目前使用AGFI处理大偏移量
		},
		{
			name:           "STMG3",
			argLength:      5,
			reg:            regInfo{inputs: []regMask{ptrsp, buildReg("R1"), buildReg("R2"), buildReg("R3"), 0}},
			aux:            "SymOff",
			typ:            "Mem",
			asm:            "STMG",
			faultOnNilArg0: true,
			symEffect:      "Write",
			clobberFlags:   true, // TODO（mundaym）：当前使用AGFI处理大偏移量
		},
		{
			name:      "STMG4",
			argLength: 6,
			reg: regInfo{inputs: []regMask{
				ptrsp,
				buildReg("R1"),
				buildReg("R2"),
				buildReg("R3"),
				buildReg("R4"),
				0,
			}},
			aux:            "SymOff",
			typ:            "Mem",
			asm:            "STMG",
			faultOnNilArg0: true,
			symEffect:      "Write",
			clobberFlags:   true, // TODO（mundaym）：当前使用AGFI处理大偏移量
		},
		{
			name:           "STM2",
			argLength:      4,
			reg:            regInfo{inputs: []regMask{ptrsp, buildReg("R1"), buildReg("R2"), 0}},
			aux:            "SymOff",
			typ:            "Mem",
			asm:            "STMY",
			faultOnNilArg0: true,
			symEffect:      "Write",
			clobberFlags:   true, // TODO（mundaym）：当前使用AGFI处理大偏移量
		},
		{
			name:           "STM3",
			argLength:      5,
			reg:            regInfo{inputs: []regMask{ptrsp, buildReg("R1"), buildReg("R2"), buildReg("R3"), 0}},
			aux:            "SymOff",
			typ:            "Mem",
			asm:            "STMY",
			faultOnNilArg0: true,
			symEffect:      "Write",
			clobberFlags:   true, // TODO（mundaym）：当前使用AGFI处理大偏移量
		},
		{
			name:      "STM4",
			argLength: 6,
			reg: regInfo{inputs: []regMask{
				ptrsp,
				buildReg("R1"),
				buildReg("R2"),
				buildReg("R3"),
				buildReg("R4"),
				0,
			}},
			aux:            "SymOff",
			typ:            "Mem",
			asm:            "STMY",
			faultOnNilArg0: true,
			symEffect:      "Write",
			clobberFlags:   true, // TODO（mundaym）：当前使用AGFI处理大偏移量
		},

		// large move 
		// auxint=循环后剩余字节数（rem）
		// arg0=dst内存地址（R1中，作为副作用更改）
		// arg1=src内存地址（R2中，作为副作用更改）
		// arg2=指向循环中最后一个移动地址的指针+256 
		// arg3=mem 
		// 返回mem 
		// 
		// mvc:mvc$256，0（R2），0（R1）
		// MOVD$256（R1），R1 
		// MOVD$256（R2），R2 
		// CMP R2，Rarg2 
		// BNE mvc 
		// mvc$rem，0（R2），0（R1）
		{
			name:      "LoweredMove",
			aux:       "Int64",
			argLength: 4,
			reg: regInfo{
				inputs:   []regMask{buildReg("R1"), buildReg("R2"), gpsp},
				clobbers: buildReg("R1 R2"),
			},
			clobberFlags:   true,
			typ:            "Mem",
			faultOnNilArg0: true,
			faultOnNilArg1: true,
		},

		// large clear 
		// auxint=循环后剩余字节数（rem）
		// arg0=dst内存地址（在R1中，作为副作用更改）
		// arg1=指向循环中最后一个零地址的指针+256 
		// arg2 mem 
		// 返回mem 
		// 
		// clear:clear$256，0（R1）
		// MOVD$256（R1），R1 
		// CMP R1，Rarg2 
		// BNE clear 
		// clear$rem，0（R1）
		{
			name:      "LoweredZero",
			aux:       "Int64",
			argLength: 3,
			reg: regInfo{
				inputs:   []regMask{buildReg("R1"), gpsp},
				clobbers: buildReg("R1"),
			},
			clobberFlags:   true,
			typ:            "Mem",
			faultOnNilArg0: true,
		},
	}

	// s390x上的所有块都有其条件代码掩码（s390x.CCMask）作为辅助值。
	// 条件代码掩码是一个4位掩码，其中每个位对应一个条件
	// 代码值。如果条件代码的值与条件
	// 代码掩码中设置的位匹配，则执行第一个后继代码。否则，第二个继任者是
	// 执行。
	// 
	// /|条件代码值|掩码位| 
	// /+--------------------------------------+
	// /| 0（相等）| 0b1000（8）| 
	// /| 1（小于）| 0b0100（4）| 
	// 注意：比较和分支指令不能设置位3（0b0001）。
	var S390Xblocks = []blockData{
		// 条件分支
		{name: "BRC", controls: 1, aux: "S390XCCMask"}, // 条件代码值（标志）是控件[0]

		// 比较和分支（寄存器寄存器）
		// -集成控件[0]与控件[1]
		// -两个控件值必须在通用寄存器
		{name: "CRJ", controls: 2, aux: "S390XCCMask"},   // 有符号32位整数比较
		{name: "CLRJ", controls: 2, aux: "S390XCCMask"},  // 无符号32位整数比较
		{name: "CLGRJ", controls: 2, aux: "S390XCCMask"}, // 无符号64位整数比较

		// 比较和分支（寄存器立即数）
		// /-集成控件[0]与生长素
		// /-控件值必须在通用寄存器
		// /-生长素值对有符号比较
		// 进行符号扩展，对无符号比较
		{name: "CIJ", controls: 1, aux: "S390XCCMaskInt8"},    // 有符号32位整数比较
		{name: "CGIJ", controls: 1, aux: "S390XCCMaskInt8"},   // 有符号64位整数比较
		{name: "CLIJ", controls: 1, aux: "S390XCCMaskUint8"},  // 无符号32位整数比较
		{name: "CLGIJ", controls: 1, aux: "S390XCCMaskUint8"}, // 无符号64位整数比较
	}

	archs = append(archs, arch{
		name:            "S390X",
		pkg:             "cmd/internal/obj/s390x",
		genfile:         "../../s390x/ssa.go",
		ops:             S390Xops,
		blocks:          S390Xblocks,
		regnames:        regNamesS390X,
		gpregmask:       gp,
		fpregmask:       fp,
		framepointerreg: -1, // 未使用
		linkreg:         int8(num["R14"]),
		imports: []string{
			"cmd/internal/obj/s390x",
		},
	})
}
